package com.link2room.bumblebee.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/12/18
 */
@Entity
@Table(name = "web_settings")
public class WebSettingsEntity extends BaseEntity{
    private String domain;
    private String name;
    private String logo;
    private String wxQrCodeImg;
    private String ICP;
    private String appid;
    private String componentAppid;
    private String statisticsId;
    private String cssExtra;
    private String code;

    @Basic
    @Column(name = "domain")
    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "logo")
    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    @Basic
    @Column(name = "appid")
    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    @Basic
    @Column(name = "component_appid")
    public String getComponentAppid() {
        return componentAppid;
    }

    public void setComponentAppid(String componentAppid) {
        this.componentAppid = componentAppid;
    }

    @Basic
    @Column(name = "statistics_id")
    public String getStatisticsId() {
        return statisticsId;
    }

    public void setStatisticsId(String statisticsCode) {
        this.statisticsId = statisticsCode;
    }

    @Basic
    @Column(name = "css_extra")
    public String getCssExtra() {
        return cssExtra;
    }

    public void setCssExtra(String cssExtra) {
        this.cssExtra = cssExtra;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "wx_qr_code_img")
    public String getWxQrCodeImg() {
        return wxQrCodeImg;
    }

    public void setWxQrCodeImg(String wxQrCodeImg) {
        this.wxQrCodeImg = wxQrCodeImg;
    }

    @Basic
    @Column(name = "ICP")
    public String getICP() {
        return ICP;
    }

    public void setICP(String ICP) {
        this.ICP = ICP;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WebSettingsEntity that = (WebSettingsEntity) o;

        if (domain != null ? !domain.equals(that.domain) : that.domain != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (logo != null ? !logo.equals(that.logo) : that.logo != null) return false;
        if (wxQrCodeImg != null ? !wxQrCodeImg.equals(that.wxQrCodeImg) : that.wxQrCodeImg != null) return false;
        if (ICP != null ? !ICP.equals(that.ICP) : that.ICP != null) return false;
        if (appid != null ? !appid.equals(that.appid) : that.appid != null) return false;
        if (componentAppid != null ? !componentAppid.equals(that.componentAppid) : that.componentAppid != null)
            return false;
        if (statisticsId != null ? !statisticsId.equals(that.statisticsId) : that.statisticsId != null) return false;
        if (cssExtra != null ? !cssExtra.equals(that.cssExtra) : that.cssExtra != null) return false;
        return code != null ? code.equals(that.code) : that.code == null;
    }

    @Override
    public int hashCode() {
        int result = domain != null ? domain.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (logo != null ? logo.hashCode() : 0);
        result = 31 * result + (wxQrCodeImg != null ? wxQrCodeImg.hashCode() : 0);
        result = 31 * result + (ICP != null ? ICP.hashCode() : 0);
        result = 31 * result + (appid != null ? appid.hashCode() : 0);
        result = 31 * result + (componentAppid != null ? componentAppid.hashCode() : 0);
        result = 31 * result + (statisticsId != null ? statisticsId.hashCode() : 0);
        result = 31 * result + (cssExtra != null ? cssExtra.hashCode() : 0);
        result = 31 * result + (code != null ? code.hashCode() : 0);
        return result;
    }
}
